package com.example.library_common.view.video_view

import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import android.widget.LinearLayout

class ViewTouchInterceptLayout
@JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)
    : LinearLayout(context,attrs,defStyleAttr) {

    private var intercept=false

    fun setIntercept(intercept: Boolean)= run { this.intercept=intercept }

    override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
        return intercept
    }

}